//
//  CarSourcesRecommendCell.m
//  NtoccShipper
//
//  Created by mac on 2019/12/27.
//  Copyright © 2019 zhuchongjin. All rights reserved.
//

#import "CarSourcesRecommendCell.h"

@interface CarSourcesRecommendCell()
@property (nonatomic,strong) CJLabel *labLicenseNum;
@property (nonatomic,strong) CJLabel *labCarType;
@property (nonatomic,strong) CJLabel *labGoodsType;
@property (strong, nonatomic) CJLabel *labShipperAdress;
@property (strong, nonatomic) CJLabel *labConsigneeAdress;
@property (nonatomic,strong) CJView *viewBottomLine;
@property (nonatomic,strong) CJView *viewTopLine;
@property (nonatomic,strong) CJLabel *labPhone;
@property (nonatomic,strong) CJLabel *labDriverName;
@property (nonatomic,strong) CJLabel *labThroughAdress;
@property (nonatomic,strong) CJLabel *labLocation;
@end

@implementation CarSourcesRecommendCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (void)setCellInfoWithModel:(CarSourcesRecommendModel *)model{
    
    self.labLicenseNum.text = model.licenseNumber;
    self.labCarType.text = model.vehicleTypeName;
    self.labGoodsType.text = model.loadStatusName;
    self.labShipperAdress.text = model.departure;
    self.labConsigneeAdress.text = model.destination;
    self.labPhone.text = model.driverPhone;
    self.labDriverName.text = model.driverName;
    self.labThroughAdress.text = model.through;
    self.labLocation.text = model.lastLocation;
}

- (void)drawRect:(CGRect)rect{
    [CJControl drawLineOfDashByCAShapeLayer:self.viewBottomLine lineLength:2 lineSpacing:1.5 lineColor:[UIColor cjBackgroundColor] lineDirection:NO];
    [CJControl drawLineOfDashByCAShapeLayer:self.viewTopLine lineLength:2 lineSpacing:1.5 lineColor:[UIColor cjBackgroundColor] lineDirection:NO];
}

- (void)btnClickPhoneAction{
    if (self.blockPhone) {
        self.blockPhone(@"");
    }
}

@end
